package org.mybatis.plugin;

import com.fasterxml.jackson.annotation.JsonView;
import com.yunchang.springboot.config.JsonViewManager;

import java.io.Serializable;
import java.util.List;

public class Paging implements Serializable {


    private static final long serialVersionUID = 6656773008171066734L;
    @JsonView(JsonViewManager.BasicView.class)
    private int pageNum;
    @JsonView(JsonViewManager.BasicView.class)
    private int pageSize;
    @JsonView(JsonViewManager.BasicView.class)
    private Long total;
    @JsonView(JsonViewManager.BasicView.class)
    private List<?> list;

    public int getPageNum() {
        return pageNum;
    }

    public void setPageNum(int pageNum) {
        this.pageNum = pageNum;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public Long getTotal() {
        return total;
    }

    public void setTotal(Long total) {
        this.total = total;
    }

    public List<?> getList() {
        return list;
    }

    public void setList(List<?> list) {
        this.list = list;
    }

    public Paging() {
    }

    public Paging(int pageNum, int pageSize, Long total, List<?> list) {
        this.pageNum = pageNum;
        this.pageSize = pageSize;
        this.total = total;
        this.list = list;
    }

    @Override
    public String toString() {
        return "Paging{" +
                "pageNum=" + pageNum +
                ", pageSize=" + pageSize +
                ", total=" + total +
                ", list=" + list +
                '}';
    }
}